<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">



<head>
<title><h:outputText value="#{msg.pageTitle}" /></title>
</head>
<body>
	<ui:composition template="template/common/commonLayout.xhtml">
		<ui:define name="content">
			<h:form id="registerForm">
				<div class="pageTitle">
					<h:outputText value="#{msg.registration}" />
				</div>
				<br />
				<div class="center">
					<h:panelGrid columns="2" styleClass="form"
						headerClass="tableHeader" footerClass="tableFooter"
						rowClasses="tableRowOdd, tableRowEven">
						<f:facet name="header">
							<h:outputFormat value="#{msg.registrationBoxTitle}">
								<f:param value="*" />
							</h:outputFormat>
						</f:facet>

						<f:facet name="footer">
							<h:panelGroup>
								<h:commandButton value="#{msg.submit}"
									action="#{userBean.register}" />
								<h:commandButton value="#{msg.reset}" type="reset" />
							</h:panelGroup>
						</f:facet>
						<h:outputLabel for="userName" value="#{msg.userName}" />
						<h:panelGroup>
							<h:inputText id="userName" value="#{userBean.user.userName}"
								maxlength="255" size="30" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="title" styleClass="formUserError" />
						</h:panelGroup>
						<h:outputLabel for="title" value="#{msg.registrationTitle}" />
						<h:panelGroup>
							<h:inputText id="title" value="#{userBean.user.title}"
								maxlength="45" size="10" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="title" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="firstName" value="#{msg.registrationName}" />
						<h:panelGroup>
							<h:inputText id="firstName" value="#{userBean.user.firstName}"
								maxlength="255" size="30" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="firstName" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="lastName" value="#{msg.registrationSurname}" />
						<h:panelGroup>
							<h:inputText id="lastName" value="#{userBean.user.lastName}"
								maxlength="255" size="30" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="lastName" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="suffix" value="#{msg.registrationSuffix}" />
						<h:panelGroup>
							<h:inputText id="suffix" value="#{userBean.user.suffix}"
								maxlength="45" size="15" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="suffix" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="dateOfBirth"
							value="#{msg.registrationDateOfBirth}" />
						<h:panelGroup>
							<h:inputText id="dateOfBirth"
								value="#{userBean.user.dateOfBirth}">
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</h:inputText>
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="dateOfBirth" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="gender" value="#{msg.registrationGender}" />
						<h:selectOneRadio id="gender" value="#{userBean.user.gender}">
							<f:selectItems value="#{userBean.genders}" />
						</h:selectOneRadio>

						<h:outputLabel for="maritalStatus"
							value="#{msg.registrationMaritalStatus}" />
						<h:selectOneRadio id="maritalStatus"
							value="#{userBean.user.maritalStatus}">
							<f:selectItems value="#{userBean.maritalStati}" />
						</h:selectOneRadio>

						<h:outputLabel for="line1" value="#{msg.registrationAddress1}" />
						<h:panelGroup>
							<h:inputText id="line1" value="#{userBean.user.address.line1}"
								maxlength="255" size="50" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="line1" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="line2" value="#{msg.registrationAddress2}" />
						<h:panelGroup>
							<h:inputText id="line2" value="#{userBean.user.address.line2}"
								maxlength="255" size="50" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="line2" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="line3" value="#{msg.registrationAddress3}" />
						<h:panelGroup>
							<h:inputText id="line3" value="#{userBean.user.address.line3}"
								maxlength="255" size="50" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="line3" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="line4" value="#{msg.registrationAddress4}" />
						<h:panelGroup>
							<h:inputText id="line4" value="#{userBean.user.address.line4}"
								maxlength="255" size="50" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="line4" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="postcode" value="#{msg.registrationPostcode}" />
						<h:panelGroup>
							<h:inputText id="postcode"
								value="#{userBean.user.address.postcode}" maxlength="50"
								size="20" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="postcode" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="country" value="#{msg.registrationCountry}" />
						<h:panelGroup>
							<h:inputText id="country"
								value="#{userBean.user.address.country}" maxlength="150"
								size="40" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="country" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="daytimePhone"
							value="#{msg.registrationPhoneDay}" />
						<h:panelGroup>
							<h:inputText id="daytimePhone"
								value="#{userBean.user.daytimePhone}" maxlength="45" size="12" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="daytimePhone" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="eveningPhone"
							value="#{msg.registrationPhoneEvening}" />
						<h:panelGroup>
							<h:inputText id="eveningPhone"
								value="#{userBean.user.eveningPhone}" maxlength="45" size="12" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="eveningPhone" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="email" value="*#{msg.registrationEmail}" />
						<h:panelGroup>
							<h:inputText id="email" value="#{userBean.user.email}"
								maxlength="255" size="50" required="true">
								<f:validator validatorId="EmailValidator" />
							</h:inputText>
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="email" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="emailConfirm"
							value="*#{msg.registrationEmailConfirm}" />
						<h:panelGroup>
							<h:inputText id="emailConfirm" value="#{userBean.emailConfirm}"
								maxlength="255" size="50" required="true" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="emailConfirm" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="password" value="*#{msg.registrationPassword}" />
						<h:panelGroup>
							<h:inputSecret id="password" value="#{userBean.user.password}"
								maxlength="64" size="20" required="true" redisplay="true">
								<f:validateLength minimum="6" />
							</h:inputSecret>
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="password" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="passwordConfirm"
							value="*#{msg.registrationPasswordConfirm}" />
						<h:panelGroup>
							<h:inputSecret id="passwordConfirm"
								value="#{userBean.passwordConfirm}" maxlength="64" size="20"
								required="true" redisplay="true" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="passwordConfirm" styleClass="formUserError" />
						</h:panelGroup>

						<h:outputLabel for="webSite" value="#{msg.registrationWeb}" />
						<h:panelGroup>
							<h:inputText id="webSite" value="#{userBean.user.webSite}"
								maxlength="255" size="50" />
							<f:verbatim>
								<br />
							</f:verbatim>
							<h:outputText value=" " />
							<h:message for="webSite" styleClass="formUserError" />
						</h:panelGroup>

					</h:panelGrid>
				</div>
			</h:form>
		</ui:define>
	</ui:composition>
</body>
</html>
